//--------------- Configuracion -> General de la aplicacion ---------------

var EBConfig = Class.create( );

EBConfig.prototype = {
	
	initialize: function( ) {
		//Elementos del DOM
		this.mainContainer = 'event-browser';
		this.daysContainer = 'event-global';
		this.ueventsContainer = 'undevents-zone';
		this.eventListContainer = 'event-list';
		this.loadingContainer = 'loading';
		this.filterInput = 'keyword';
		this.filterButton = 'dofilter';
		
		//Navegador principal
		this.updateTime = 60; // in seconds
		
		//Eventos por dias
		this.eventDayWidth = 8;
		this.totalDays = 200;
		this.eventDaysUpdateTime = 600; // in seconds
		
		//Niveles de prioridad
		this.priorityLevels = new Array('low', 'normal', 'mid', 'high', 'danger');
		this.sliderContainer = 'track1';
		this.sliderHandler = 'handle1';
		
		//Urls
                if(window.parent && window.parent.EBUrlsForBackEnd) {
                    Object.extend(this, window.parent.EBUrlsForBackEnd);
                } else {
                    this.site = "http://localhost/eventbrowser/";
                    this.eventsUrl = this.site + 'events.xml';
                    this.globalEventsUrl = this.site + 'events.xml';
                    this.eventsListUrl = this.site + 'events.xml';
                    this.undefinedEventsUrl = this.site + 'uevents.xml';
                }
	},
	
	setZoom: function( ) {
		//Definicion de los niveles de zoom
		/**
		* Este es el significado de los parametros:
		*	1. anchura del slot
		*	2. clase que se aplica al slot
		*	3. numero de slots simultaneos
		*	4. magnitud de tiempo del zoom
		*	5. nivel de zoom por defecto
		*/
		$RGE('zoom').newLevel(360, 'event-slot-xxl', 10, '15 minutes', false);		
		$RGE('zoom').newLevel(340, 'event-slot-xxl', 10, '30 minutes', false);
		$RGE('zoom').newLevel(320, 'event-slot-xxl', 10, '45 minutes', false);
		$RGE('zoom').newLevel(300, 'event-slot-xl', 10, '1 hours', false);
		$RGE('zoom').newLevel(280, 'event-slot-xl', 15, '2 hours', false);
		$RGE('zoom').newLevel(260, 'event-slot-xl', 15, '4 hours', false);
		$RGE('zoom').newLevel(240, 'event-slot-xl', 15, '8 hours', false);
		$RGE('zoom').newLevel(220, 'event-slot-l', 20, '12 hours', false);
		$RGE('zoom').newLevel(200, 'event-slot-m', 20, '1 days', true);
		$RGE('zoom').newLevel(180, 'event-slot-m', 25, '3 days', false);
		$RGE('zoom').newLevel(160, 'event-slot-m', 25, '7 days', false);
		$RGE('zoom').newLevel(140, 'event-slot-s', 25, '1 months', false);
		$RGE('zoom').newLevel(120, 'event-slot-s', 25, '2 months', false);
	}
	
}
